package com.jin.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.jin.bean.User;
import org.apache.ibatis.annotations.*;


/**
 * Created on 2024/6/5.
 *
 * @author Zhongyuan Jin
 */

public interface UserMapper extends BaseMapper<User> {
    User findByUsername(@Param("username") String username);
    int insertUser(User user);

    @Delete("DELETE FROM user WHERE id=#{id}")
    int deleteUser(Integer id);

    User getUserById(Integer id);
}
